<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>nodeListToArray</title>
</head>
<body>
    <script>
        const nodeListToArray = nodeList => [...nodeList];
        document.writeln(nodeListToArray(document.childNodes).map(node => JSON.stringify(node)));
    </script>
</body>
</html>